<template>
  <div>
    <CustomForm :customFields="findPasswordFields" :handleSubmit="submit"  />
  </div>
</template>

<script setup lang="ts">
import CustomForm from './basicForm.vue';
import {GoPageName,Icons} from "@/enums/index.ts"

// 提交接口函数
const submit = (data: any) => {
  console.log('找回密码，提交数据', data);
}

// 传给自定义组件的参数
const findPasswordFields = {
  title: '找回密码',
  btnTitle: "确认",
  type:GoPageName.FINDPASSWORD,
  inputData: [
    {
      lable: "phoneNomber",value:"", inputPlaceholder: '请输入手机号', type:"tel",icon: Icons.IPHONE
    },
    {
      lable: "numberCode",value:"", inputPlaceholder: '请输入验证码', type:"password",icon:Icons.LOCK
    },
  ],
  rules: [
    [{ required: true, message: '请检查手机号，并重新输入', trigger: 'blur' },],
    [{ required: true, message: '重新输入验证码', trigger: 'blur' },]
  ],
};
</script>
